package com.lei.config;

public class EnumToString {

	private static String [] pas = {"Interface-width","Interface-height","Interface-variable"};
	
	private EnumToString() {
	
	}
	
	public static String getString(Config con){
		String str = "";
		switch (con) {
		case INTERFACEHEIGHT:
			str = pas[0];
			break;
		case INTERFACEWIDTH:
			str = pas[1];
			break;
		case INTERFACEVARIABLE:
			str = pas[2];
			break;
		default:
			str = "";
			break;
		}
		return str;
	}
	
	public static boolean getBoolean(String boo){
		
		boolean is = false;
		
		if(boo.equals("FALSE")){
			is = false;
		}else if(boo.equals("false")){
			is = false;
		}else if(boo.equals("TRUE")){
			is = true;
		}else if(boo.equals("True")){
			is = true;
		}else if(boo.equals("true")){
			is = true;
		}else if(boo.equals("False")){
			is = false;
		}
		
		return is;
	}
	
	public static int getInt(String str){
		int toint = 0;
		
		toint = Integer.parseInt(str);
		
		return toint;
	}
}
